package com.lxd.config;


import com.lxd.common.constants.RabbitMQConstants;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Dongdong
 * @注释 rabbitmq 配置类
 */
@Configuration
public class RabbitMQConfig {
    /**
     * 策略模块发送手机号归属地&运营商到后台管理模块
     */
    @Bean
    public Queue preSendQueue(){
       return QueueBuilder.durable(RabbitMQConstants.MOBILE_AREA_OPERATOR).build();
    }

    /**
     * 写日志的队列。发送至搜索模块
     * @return
     */
    @Bean
    public Queue writeLogQueue(){
        return QueueBuilder.durable(RabbitMQConstants.SMS_WRITE_LOG).build();
    }

    /**
     * 推送状态报告的队列
     * @return
     */
    @Bean
    public Queue pushReportQueue(){
        return QueueBuilder.durable(RabbitMQConstants.SMS_PUSH_REPORT).build();
    }

}
